//供应商表
"use strict";
var mongoose = require('../index');

var providerSchema = new mongoose.Schema({
    providerName: String,      //名称
    providerAbbr: String,      //简称
    providerCode: String,      //代码
    providerType: Number,      //供应商类型
    providerLevel: String,     //供应商级别
    providerStatus: String,    //供应商状态
    country: String,
    city: String,
    serviceTel: String,         //客服电话
    officialURL: String,        // 官方网站地址
    contractURL: String,       // 保单查询网址
    wechat: String,            //微信号
    lxRen: String,               //联系人
    telephone: String,           //联系人电话
    mobilePhone: String,         //联系人手机
    address: String,              //地址,
    logoUrl: String,              //LOGO
    logo1Url: String,
    website: String, //网址
    claimRemark: String, //索赔指引
    //理赔资料清单
    claimDetail: [{
        name: String
    }],
    //寿险影像
    mustImage: {
        'i1': { type: [], formatter: new mongoose.Schema.Formatter.Stringify()},
        'i2': { type: [], formatter: new mongoose.Schema.Formatter.Stringify()},
        'i3': { type: [], formatter: new mongoose.Schema.Formatter.Stringify()},
        'i4': { type: [], formatter: new mongoose.Schema.Formatter.Stringify()},
        'i5': { type: [], formatter: new mongoose.Schema.Formatter.Stringify()},
    },

    //////////////////////审计字段////////////////////////
    //创建时间
    createdAt: { type: Date, default: Date.now },
    //更新时间
    updatedAt: { type: Date },
    //创建用户
    createBy: String,
    //更新用户
    updateBy: String
}, { collection: 'provider' });


module.exports = mongoose.model('Provider', providerSchema);
